package io.kiki.sba.registry.util;


public class OsUtils {

    private static final int CPU_COUNT;

    static {
        String cpuCount = SystemUtils.getSystem("CPU_COUNT");
        if (cpuCount != null) {
            CPU_COUNT = Integer.parseInt(cpuCount);
        } else {
            CPU_COUNT = Runtime.getRuntime().availableProcessors();
        }
    }

    public static int getCpuCount() {
        return CPU_COUNT;
    }
}
